package _250316;

public class Test {
	public static void main(String[] args) {
		//5050 236
		
		
		int[] arr=new int[101];
		for(int i=1;i<=100;i++) {	
			arr[i]=i;
		}
		
		int i=0;int j=0;int count=0;
		for(int left=1,right=1;right<=100;right++) {
			count+=arr[right];
			while(count>236) {
				count-=arr[left++];
			}
			if(count==236) {
				System.out.println(left+" "+right);
			}
		}

	}
}
